package com.example.demo;

public class testEncryption {
    public static void main(String[] args) throws Exception {
        String jsonStr = "{\n" +
                "  \"body\" : {\n" +
                "    \"companyId\" : \"89c772ce3f8042ad9873770e35d6900a\"\n" +
                "  },\n" +
                "  \"cloudKey\" : \"returnResult\",\n" +
                "  \"requestSource\" : \"CLApproveWebH5\",\n" +
                "  \"version\" : 1\n" +
                "}";
        String encrypt = SM2Util.encrypt(jsonStr, "e5e6bba043d1db065c74d0947b7f82cc");
        System.out.println(SM2Util.decrypt(encrypt));
    }

    public static String decryptSM4Key(String a,String b) throws Exception {
        String decryptSM4Key = SM2Util.decrypt(a);
        String decrypt = SM4Util.decrypt(b, decryptSM4Key);
        return decrypt;
    }



}
